<template>
  <el-collapse v-model="contentName" accordion>
    <el-collapse-item title="目录信息" name="1">
      <div v-if="manageName == 'DZWJ'">
        <el-form ref="manageData" :model="manageData" label-width="240px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="单位名称">
                <el-tooltip class="item" effect="light" :content="manageData.DWMC" :disabled="manageData.DWMC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.DWMC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="归档时间">
                <el-tooltip class="item" effect="light" :content="manageData.GDSJ" :disabled="manageData.GDSJ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.GDSJ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="归档电子文件门类">
                <el-tooltip class="item" effect="light" :content="manageData.GDDZWJML" :disabled="manageData.GDDZWJML == null"  placement="bottom-start">
                  <el-input  v-model="manageData.GDDZWJML" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="归档电子文件数量">
                <el-tooltip class="item" effect="light" :content="manageData.GDDZWJSL" :disabled="manageData.GDDZWJSL == null"  placement="bottom-start">
                  <el-input  v-model="manageData.GDDZWJSL" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="归档方式">
                <el-tooltip class="item" effect="light" :content="manageData.GDFS" :disabled="manageData.GDFS == null"  placement="bottom-start">
                  <el-input  v-model="manageData.GDFS" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="载体外观检测">
                <el-tooltip class="item" effect="light" :content="manageData.ZTWGJC" :disabled="manageData.ZTWGJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.ZTWGJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="病毒检测">
                <el-tooltip class="item" effect="light" :content="manageData.BDJC" :disabled="manageData.BDJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.BDJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="真实性检测">
                <el-tooltip class="item" effect="light" :content="manageData.ZSXJC" :disabled="manageData.ZSXJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.ZSXJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="安全性检测">
                <el-tooltip class="item" effect="light" :content="manageData.AQXJC" :disabled="manageData.AQXJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.AQXJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="完整性检测">
                <el-tooltip class="item" effect="light" :content="manageData.WZXJC" :disabled="manageData.WZXJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.WZXJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="可用性检测">
                <el-tooltip class="item" effect="light" :content="manageData.KYXJC" :disabled="manageData.KYXJC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.KYXJC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="技术方法与相关软件说明">
                <el-tooltip class="item" effect="light" :content="manageData.JSFFYXGRJSM" :disabled="manageData.JSFFYXGRJSM == null"  placement="bottom-start">
                  <el-input  v-model="manageData.JSFFYXGRJSM" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div v-if="manageName == 'GDYJ'">
        <el-form ref="manageData" :model="manageData" label-width="240px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="移交单位名称">
                <el-tooltip class="item" effect="light" :content="manageData.YJDWMC" :disabled="manageData.YJDWMC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.YJDWMC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="移交人">
                <el-tooltip class="item" effect="light" :content="manageData.YJRXM" :disabled="manageData.YJRXM == null"  placement="bottom-start">
                  <el-input  v-model="manageData.YJRXM" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="移交人工号">
                <el-tooltip class="item" effect="light" :content="manageData.YJRGH" :disabled="manageData.YJRGH == null"  placement="bottom-start">
                  <el-input  v-model="manageData.YJRGH" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="移交时间">
                <el-tooltip class="item" effect="light" :content="manageData.YJSJ" :disabled="manageData.YJSJ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.YJSJ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="接收单位名称">
                <el-tooltip class="item" effect="light" :content="manageData.JSDWMC" :disabled="manageData.JSDWMC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.JSDWMC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接收人">
                <el-tooltip class="item" effect="light" :content="manageData.JSRXM" :disabled="manageData.JSRXM == null"  placement="bottom-start">
                  <el-input  v-model="manageData.JSRXM" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="接收时间">
                <el-tooltip class="item" effect="light" :content="manageData.JSSJ" :disabled="manageData.JSSJ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.JSSJ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div v-if="manageName == 'XGSP'">
        <el-form ref="manageData" :model="manageData" label-width="240px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="案件名称">
                <el-tooltip class="item" effect="light" :content="manageData.AJMC" :disabled="manageData.AJMC == null"  placement="bottom-start">
                  <el-input  v-model="manageData.AJMC" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="承办人">
                <el-tooltip class="item" effect="light" :content="manageData.CBR" :disabled="manageData.CBR == null"  placement="bottom-start">
                  <el-input  v-model="manageData.CBR" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="统一受案号">
                <el-tooltip class="item" effect="light" :content="manageData.TYSAH" :disabled="manageData.TYSAH == null"  placement="bottom-start">
                  <el-input  v-model="manageData.TYSAH" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="部门受案号">
                <el-tooltip class="item" effect="light" :content="manageData.BMSAH" :disabled="manageData.BMSAH == null"  placement="bottom-start">
                  <el-input  v-model="manageData.BMSAH" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="归档号">
                <el-tooltip class="item" effect="light" :content="manageData.GDH" :disabled="manageData.GDH == null"  placement="bottom-start">
                  <el-input  v-model="manageData.GDH" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申请修改内容">
                <el-tooltip class="item" effect="light" :content="manageData.SQXGNR" :disabled="manageData.SQXGNR == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SQXGNR" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="修改申请原因">
                <el-tooltip class="item" effect="light" :content="manageData.XGSQYY" :disabled="manageData.XGSQYY == null"  placement="bottom-start">
                  <el-input  v-model="manageData.XGSQYY" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="申请人">
                <el-tooltip class="item" effect="light" :content="manageData.SQR" :disabled="manageData.SQR == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SQR" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="申请日期">
                <el-tooltip class="item" effect="light" :content="manageData.SQRQ" :disabled="manageData.SQRQ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SQRQ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="审批意见">
                <el-tooltip class="item" effect="light" :content="manageData.SPYJ" :disabled="manageData.SPYJ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SPYJ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="审核人">
                <el-tooltip class="item" effect="light" :content="manageData.SHR" :disabled="manageData.SHR == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SHR" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="审批日期">
                <el-tooltip class="item" effect="light" :content="manageData.SPRQ" :disabled="manageData.SPRQ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.SPRQ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="档案部门意见">
                <el-tooltip class="item" effect="light" :content="manageData.DABMYJ" :disabled="manageData.DABMYJ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.DABMYJ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="档案员">
                <el-tooltip class="item" effect="light" :content="manageData.DAY" :disabled="manageData.DAY == null"  placement="bottom-start">
                  <el-input  v-model="manageData.DAY" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="档案部门意见日期">
                <el-tooltip class="item" effect="light" :content="manageData.DABMYJRQ" :disabled="manageData.DABMYJRQ == null"  placement="bottom-start">
                  <el-input  v-model="manageData.DABMYJRQ" disabled/>
                </el-tooltip>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
    </el-collapse-item>
    <el-collapse-item title="文件实体信息" name="2">
      <el-form ref="manageData" :model="manageData" label-width="240px">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="文件名称">
              <el-tooltip class="item" effect="light" :content="manageData.WJMC" :disabled="manageData.WJMC == null"  placement="bottom-start">
                <el-input  v-model="manageData.WJMC" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="格式信息">
              <el-tooltip class="item" effect="light" :content="manageData.GSXX" :disabled="manageData.GSXX == null"  placement="bottom-start">
                <el-input  v-model="manageData.GSXX" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="文件大小">
              <el-tooltip class="item" effect="light" :content="manageData.WJDX" :disabled="manageData.WJDX == null"  placement="bottom-start">
                <el-input  v-model="manageData.WJDX" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="创建程序">
              <el-tooltip class="item" effect="light" :content="manageData.CJCX" :disabled="manageData.CJCX == null"  placement="bottom-start">
                <el-input  v-model="manageData.CJCX" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="形成日期">
              <el-tooltip class="item" effect="light" :content="manageData.XCRQ" :disabled="manageData.XCRQ == null"  placement="bottom-start">
                <el-input  v-model="manageData.XCRQ" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="文件路径">
              <el-tooltip class="item" effect="light" :content="manageData.WJLJ" :disabled="manageData.WJLJ == null"  placement="bottom-start">
                <el-input  v-model="manageData.WJLJ" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="数字摘要算法">
              <el-tooltip class="item" effect="light" :content="manageData.SZZYSF" :disabled="manageData.SZZYSF == null"  placement="bottom-start">
                <el-input  v-model="manageData.SZZYSF" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="数字摘要值">
              <el-tooltip class="item" effect="light" :content="manageData.SZZYZ" :disabled="manageData.SZZYZ == null"  placement="bottom-start">
                <el-input  v-model="manageData.SZZYZ" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="类型">
              <el-tooltip class="item" effect="light" :content="manageData.TYPE" :disabled="manageData.TYPE == null"  placement="bottom-start">
                <el-input  v-model="manageData.TYPE" disabled/>
              </el-tooltip>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-collapse-item>
    <el-collapse-item title="业务管理信息" name="3">
      <el-table v-loading="loading" :data="businessList" border>
        <el-table-column prop="IDH" label="ID号" align="center"></el-table-column>
        <el-table-column prop="GLHDMS" label="管理活动描述" align="center"></el-table-column>
        <el-table-column prop="GLXW" label="管理行为" align="center"></el-table-column>
        <el-table-column prop="GLJG" label="管理结果" align="center"></el-table-column>
        <el-table-column prop="GLSJ" label="管理时间" align="center"></el-table-column>
        <el-table-column prop="GLR" label="管理人" align="center"></el-table-column>
        <el-table-column prop="DWMC" label="单位名称" align="center"></el-table-column>
        <el-table-column prop="BM" label="部门" align="center"></el-table-column>
        <el-table-column prop="ZW" label="职务" align="center"></el-table-column>
        <el-table-column prop="TYPE" label="类型" align="center"></el-table-column>
      </el-table>
    </el-collapse-item>
  </el-collapse>
</template>

<script>
import {getInfomation} from "@/api/archive/digitalizeReceive/archiveReception";

export default {
  name: "managementContent",
  props: ['manageName', 'folderId'],
  data() {
    return {
      contentName: null,
      manageData: {},
      loading: true,
      businessList: []
    }
  },
  watch: {
    contentName: {
      handler(name) {
        if(name == '1') {
          if(this.manageName == 'DZWJ') {
            this.form = {
              folderId: this.folderId,
              msg: 'GLDZWJGDDJBMLXX',
              bhrId: 'null'
            }
            getInfomation(this.form).then(response=>{
              this.manageData = {}
              if(response.data.length != 0) {
                this.manageData = response.data[0]
              }
            })
          } else if (this.manageName == 'GDYJ') {
            this.form = {
              folderId: this.folderId,
              msg: 'GLGDYJPZMLXX',
              bhrId: 'null'
            }
            getInfomation(this.form).then(response=>{
              this.manageData = {}
              if(response.data.length != 0) {
                this.manageData = response.data[0]
              }
            })
          } else if (this.manageName == 'XGSP') {
            this.form = {
              folderId: this.folderId,
              msg: 'GLXGSPBMLXX',
              bhrId: 'null'
            }
            getInfomation(this.form).then(response=>{
              this.manageData = {}
              if(response.data.length != 0) {
                this.manageData = response.data[0]
              }
            })
          }
        } else if (name == '2') {
          this.form = {
            folderId: this.folderId,
            msg: 'GLWJSTXX'
          }
          if(this.manageName == 'DZWJ') {
            this.form.bhrId = 'DZWJGDDJB'
          } else if (this.manageName == 'GDYJ') {
            this.form.bhrId = 'GDYJPZ'
          } else if (this.manageName == 'XGSP') {
            this.form.bhrId = 'XGSPB'
          }
          getInfomation(this.form).then(response=>{
            this.manageData = {}
            if(response.data.length != 0) {
              this.manageData = response.data[0]
            }
          })
        } else if (name == '3') {
          this.loading = true
          this.form = {
            folderId: this.folderId,
            msg: 'GLYWGLXX'
          }
          if(this.manageName == 'DZWJ') {
            this.form.bhrId = 'DZWJGDDJB'
          } else if (this.manageName == 'GDYJ') {
            this.form.bhrId = 'GDYJPZ'
          } else if (this.manageName == 'XGSP') {
            this.form.bhrId = 'XGSPB'
          }
          getInfomation(this.form).then(response=>{
            this.businessList = []
            this.businessList = response.data
            this.loading = false
          })
        }

      },
      deep: true,
      immediate: true
    }
  },
  methods: {
  }
}
</script>

<style scoped>

</style>
